﻿using SayisalAnaliz.Library;
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace SayisalAnaliz.WPF
{
	/// <summary>
	/// Interaction logic for GaussPencere.xaml
	/// </summary>
	public partial class GaussPencere : Window
	{
		public GaussPencere()
		{
			this.InitializeComponent();
			
			// Insert code required on object creation below this point.
		}

        private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            try
            {
                List<double> cevaplar = GaussEleminasyonYontemi.Uygula(txtKatsayilar.Text, txtSonuc.Text);
                for (int i = 0; i < cevaplar.Count; i++)
                {
                    lstBilinmeyenler.Items.Add(i + 1 + ". bilinmeyen -->" + cevaplar[i]);
                }
            }
            catch
            {

                System.Windows.Forms.MessageBox.Show("Uygulama çalışırken hata oluştu.\nDetayları:s.said@saidaydogan.com'a iletiniz.");
            }
        }
	}
}